const Button = ({onClick,children})=>{
    const buttonClick = (e)=>{
        e.stopPropagation();
        onClick()
    }
    return  <button onClick={buttonClick} style={{margin: '0px 12px'}}>{children}</button>
}
const CustomEvent = ({onPlay,onPause})=>{
    const clickCapture = ()=>{
        console.log('capture 执行')
    }
    return (
        <div onClickCapture={clickCapture}>
            <Button onClick={onPlay}>Play</Button>
            <Button onClick={onPause}>Pause</Button>
        </div>
    )
}

export default CustomEvent